<?php
header("content-type:text/html;charset=utf-8");
include("./conn/conn.php");
session_start();
$name=$_POST["name"];
$password=$_POST["password"];
$sql="select * from tb_hydl where account='$name' and password='$password'";
$result=mysqli_query($link,$sql);
if(mysqli_num_rows($result)>0){
	if($vidoex=mysqli_fetch_assoc($result)){
	$_SESSION['name']=$name;
	$_SESSION['namea']=$vidoex[name];
		}
	echo("<script>alert('登陆成功！');window.location.href='sy.php';</script>");
}else{
	echo("<script>alert('用户名或密码输入错误，请重新输入！');window.location.href='dlym.php';</script>");
}
?>
